Skip to main content

Last Update: 2025/3/26

LLMVision Clone Voice API

Endpoint

POST https://platform.llmprovider.ai/v1/audio/clone

Request Headers

HeaderValue
AuthorizationBearer YOUR_API_KEY
Content-Typemultipart/form-data

Request Body

ParameterTypeRequiredDescription
inputstringYesThe text content to generate audio from.
promptstringYesThe reference text for the audio sample, used to guide the model's style or continue a previous audio segment.
modelstringYesThe ID of the model to use, e.g., whisper-1.
filefileNoThe sample audio file in one of the following formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
response_formatstringNoThe output format of the transcript. Options: json, text, srt, verbose_json, or vtt. Default is json.
streambooleanNoWhether to enable streaming. Default is false.
audio_base64stringNoThe Base64-encoded audio file content.
durationint64NoThe duration of the audio file (in seconds). This is used internally and is not a request parameter.

Additional Notes:

  • Either file or audio_base64 must be provided, but not both.
  • When stream is set to true, the server will return audio data in a streaming format, suitable for real-time applications.
  • The prompt parameter can provide stylistic guidance, influencing the generated audio output.

Response Body

The transcription object or a verbose transcription object.

Example Request

{
"model": "lmp-clone-20250310",
"input": "收到好友从远方寄来的生日礼物,那份意外的惊喜与深深的祝福让我心中充满了甜蜜的快乐,笑容如花儿般笼放。",
"prompt": "我觉得最近北京的天气真的是哈,比较难难以预料吧,就昨天我们在马上就要结束的时候,突然就开始下大雨。",
"file": "./参考音频.wav"
}

Response

The API returns an audio file in the requested format.

Example Request

curl -X POST https://platform.llmprovider.ai/v1/audio/clone \
-H "Authorization: Bearer $YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F file="@audio.mp3" \
-F model="lmp-clone-20250310"

For any questions or further assistance, please contact us at [email protected].